package com.duqc.web.feign;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @ClassName StatusEnum
 * @Description 返回值枚举
 * @Author duqc
 * @Date 2023/5/8
 **/
@Getter
@AllArgsConstructor
public enum StatusEnum {
    SUCCESS(200, "操作成功"),
    BAD_REQUEST(400, "请求内容出错"),
    UNAUTHORIZED(401, "无访问权限"),
    FORBIDDEN(403, "服务端拒绝执行，一般用于服务端具备License校验的场景"),
    NOT_FOUND(404, "请求接口不存在"),
    METHOD_NOT_ALLOWED(405, "请求方法不允许"),
    INTERNAL_SERVER_ERROR(500, "服务器内部错误"),
    BUSINESS_ERROR(600, "业务错误"),

    PARAMS_INVALID(601, "参数校验失败"),
    PARAMETER_PARSE_EXCEPTION(5002,"请求参数解析异常"),
    UNKNOWN(999, "未知错误");
    /**
     * 错误编码
     */
    private final int code;
    /**
     * 错误信息
     */
    private final String message;
}
